package com.insurance.enums;

/**
 * 投保单发票状态枚举类
 */
public enum ProposalInvoiceStatusEnum {

	NOT("0", "未开票"),
	IS_APPROVAL("1", "已申请"),
	IS("2", "已开票"),
	FAIL("3", "开票失败");

    private String code;

    private String message;

    ProposalInvoiceStatusEnum(String code, String message){
        this.code = code;
        this.message = message;
    }

	public String getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}
	
	public static String getMessage(String code){
		ProposalInvoiceStatusEnum[] values = ProposalInvoiceStatusEnum.values();
		for(ProposalInvoiceStatusEnum proposalInvoiceStatusEnum : values){
			if(proposalInvoiceStatusEnum.getCode().equals(code)){
				return proposalInvoiceStatusEnum.getMessage();
			}
		}
		return "";
	}
    
}
